<?php

use app\model\SysAdmin;

return [
    'enable' => true,
    'manager' => [
        //是否开启黑名单，单点登录和多点登录的注销、刷新使原token失效，必须要开启黑名单
        'blacklist_enabled' => true,
        //黑名单缓存的前缀
        'blacklist_prefix' => 'blacklist',
        //黑名单的宽限时间 单位为：秒，注意：如果使用单点登录，该宽限时间无效
        'blacklist_grace_period' => 0,
    ],
    'stores' => [
        // 单应用
        'default' => [
            'login_type' => 'mpo', //  登录方式，sso为单点登录，mpo为多点登录
            'signer_key' => 'oP0qmqzHS4Vvml5a',
            'public_key' => 'file://path/public.key',
            'private_key' => 'file://path/private.key',
            'expires_at' => 86400,
            'refresh_ttL' => 86400 * 2,
            'leeway' => 0,
            'signer' => 'HS256',
            'type' => 'Header',
            'auto_refresh' => false,
            'iss' => 'webman.client.api',
            'event_handler' => '',
            'user_model' => ''
        ],
        // 多应用
        'admin' => [
            'login_type' => 'mpo', //  登录方式，sso为单点登录，mpo为多点登录
            'signer_key' => 'QUQ3ODAyMUREMzY1RjUwQ0M4NjM3N0FBOUIwNDBGOTg=',
            'public_key' => 'file://path/public.key',
            'private_key' => 'file://path/private.key',
            'expires_at' => 86400,
            'refresh_ttL' => 86400 * 2,
            'leeway' => 0,
            'signer' => 'HS256',
            'type' => 'Header',
            'auto_refresh' => false,
            'iss' => 'webman.client.admin',
            'event_handler' => '',
            'user_model' => SysAdmin::class
        ],
        'api' => [
            'login_type' => 'mpo', //  登录方式，sso为单点登录，mpo为多点登录
            'signer_key' => 'NUNBRTE1MzA1QzE5MTgwQjc2NjdDQUNDRkZBOTlEQ0I=',
            'public_key' => 'file://path/public.key',
            'private_key' => 'file://path/private.key',
            'expires_at' => 86400,
            'refresh_ttL' => 86400 * 2,
            'leeway' => 0,
            'signer' => 'HS256',
            'type' => 'Header|Url',
            'auto_refresh' => true,
            'iss' => 'webman.client.api',
            'event_handler' => '',
            'user_model' => \app\model\user\User::class
        ],
    ]
];